package com.ruoyi.workstation.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 工作站，PC用户对象 user
 *
 * @author ruoyi
 * @date 2024-01-14
 */
public class User extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 用户帐号
     */
    @Excel(name = "用户帐号")
    private String username;

    /**
     * 用户密码
     */
    @Excel(name = "用户密码")
    private String password;

    /**
     * 用户昵称
     */
    @Excel(name = "用户昵称")
    private String name;

    /**
     * 出生日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date birthday;

    /**
     * 工作职务
     */
    @Excel(name = "工作职务")
    private String job;

    /**
     * 性别（男=1;女=2）
     */
    @Excel(name = "性别", readConverterExp = "男==1;女=2")
    private Integer sex;
    @Excel(name = "角色", readConverterExp = "角色(1=工作站管理员，2=普通用户)")
    private Integer role;

    /**
     * 联系电话
     */
    @Excel(name = "联系电话")
    private Long mobile;

    @Excel(name = "机构名称")
    private String orgName;
    @Excel(name = "省份")
    private Long province;
    @Excel(name = "地市")
    private Long city;
    @Excel(name = "区县")
    private Long county;
    @Excel(name = "详细地址")
    private String address;

    /**
     * 创建者
     */
    @Excel(name = "创建者")
    private Long creator;

    /**
     * 更新者
     */
    @Excel(name = "更新者")
    private Long lastModifiedBy;

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUsername() {
        return username;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPassword() {
        return password;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setJob(String job) {
        this.job = job;
    }

    public String getJob() {
        return job;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public Integer getSex() {
        return sex;
    }

    public void setMobile(Long mobile) {
        this.mobile = mobile;
    }

    public Long getMobile() {
        return mobile;
    }

    public void setCreator(Long creator) {
        this.creator = creator;
    }

    public Long getCreator() {
        return creator;
    }

    public void setLastModifiedBy(Long lastModifiedBy) {
        this.lastModifiedBy = lastModifiedBy;
    }

    public Long getLastModifiedBy() {
        return lastModifiedBy;
    }

    public Integer getRole() {
        return role;
    }

    public void setRole(Integer role) {
        this.role = role;
    }

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public Long getProvince() {
        return province;
    }

    public void setProvince(Long province) {
        this.province = province;
    }

    public Long getCity() {
        return city;
    }

    public void setCity(Long city) {
        this.city = city;
    }

    public Long getCounty() {
        return county;
    }

    public void setCounty(Long county) {
        this.county = county;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("userId", getUserId())
                .append("username", getUsername())
                .append("password", getPassword())
                .append("name", getName())
                .append("birthday", getBirthday())
                .append("job", getJob())
                .append("sex", getSex())
                .append("role", getRole())
                .append("remark", getRemark())
                .append("mobile", getMobile())
                .append("creator", getCreator())
                .append("createTime", getCreateTime())
                .append("lastModifiedBy", getLastModifiedBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
